﻿
using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 从机模板基础输入参数
/// </summary>
public class DeviceSlaveTemplateBaseInput
{
    /// <summary>
    /// 从机名字
    /// </summary>
    public virtual string SlaveName { get; set; }

    /// <summary>
    /// 
    /// </summary>
    public virtual long? RelProductId { get; set; }

    /// <summary>
    /// 设备模板Id
    /// </summary>
    public virtual long DeviceTemplateInfoId { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    public virtual DateTime? CreateTime { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    public virtual DateTime? UpdateTime { get; set; }

    /// <summary>
    /// 创建者Id
    /// </summary>
    public virtual long? CreateUserId { get; set; }

    /// <summary>
    /// 创建者姓名
    /// </summary>
    public virtual string? CreateUserName { get; set; }

    /// <summary>
    /// 修改者Id
    /// </summary>
    public virtual long? UpdateUserId { get; set; }

    /// <summary>
    /// 修改者姓名
    /// </summary>
    public virtual string? UpdateUserName { get; set; }

    /// <summary>
    /// 软删除
    /// </summary>
    public virtual bool? IsDelete { get; set; }

}

/// <summary>
/// 从机模板分页查询输入参数
/// </summary>
public class PageDeviceSlaveTemplateInput : BasePageInput
{
    /// <summary>
    /// 关键字查询
    /// </summary>
    public string? SearchKey { get; set; }

    /// <summary>
    /// 从机名字
    /// </summary>
    public string? SlaveName { get; set; }

    /// <summary>
    /// 设备模板Id
    /// </summary>
    public long? DeviceTemplateInfoId { get; set; }

   // public long? DeviceId { get; set; }



}

/// <summary>
/// 从机模板增加输入参数
/// </summary>
public class AddDeviceSlaveTemplateInput : DeviceSlaveTemplateBaseInput
{
    /// <summary>
    /// 从机名字
    /// </summary>
    [Required(ErrorMessage = "从机名字不能为空")]
    public override string SlaveName { get; set; }

    /// <summary>
    /// 设备模板Id
    /// </summary>
    [Required(ErrorMessage = "设备模板Id不能为空")]
    public override long DeviceTemplateInfoId { get; set; }

}

/// <summary>
/// 从机模板删除输入参数
/// </summary>
public class DeleteDeviceSlaveTemplateInput : BaseIdInput
{
}

/// <summary>
/// 从机模板更新输入参数
/// </summary>
public class UpdateDeviceSlaveTemplateInput : DeviceSlaveTemplateBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long Id { get; set; }

}

/// <summary>
/// 从机模板主键查询输入参数
/// </summary>
public class QueryByIdDeviceSlaveTemplateInput : DeleteDeviceSlaveTemplateInput
{

}
